<template>
	<view class='content'>
		<swiper class='swiper' indicator-dots autoplay indicator-active-color='#F0FFFF'>
			<swiper-item @click='goClassify'  v-for='(item, index) in swiperList' :key='index'>
				<image class='img' :src='item'></image>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
    data(){
			return{
				swiperList:[
					'https://img1.baidu.com/it/u=311360278,3295831914&fm=26&fmt=auto&gp=0.jpg',
					'https://img1.baidu.com/it/u=3904228357,177606948&fm=26&fmt=auto&gp=0.jpg',
					'https://img2.baidu.com/it/u=1562931357,2044843031&fm=26&fmt=auto&gp=0.jpg',
					'https://img1.baidu.com/it/u=1246025764,2907627222&fm=26&fmt=auto&gp=0.jpg'
				]
			}
		},
		methods:{
			goClassify(){
				uni.navigateTo({
					url:'/pages/tab2/classify'
				})
			}
		}
	}
</script>

<style lang='scss'>
.content{
	width: 95%;
	height: 300rpx;
	margin-left: 2.5%;
	margin-top: 30rpx;
	border-radius: 20rpx;
	.swiper{
		width: 100%;
		height: 300rpx;
		.img{
			width: 100%;
			height: 100%;
			border-radius: 20rpx;
			border: 1rpx solid white;
		}
	}
}
</style>
